import React from "react"
import styles from './confirm.less'

const Confirm = ({title, text, onConfirm, onCancel}) => {
  return (
    <div className={styles.confirm}>
      <div className={styles.box}>
        <div className={styles.title}>{title}</div>
        <div dangerouslySetInnerHTML={{__html:text}} className={styles.text}></div>
        <div className={styles.bottom}>
          <div className={styles.cancel} onClick={onCancel}>取消</div>
          <div className={styles.ok} onClick={onConfirm}>确定</div>
        </div>
      </div>
    </div>
  )
}

export default Confirm

